home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_ambrapids2.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  57 lines

  1. # Jones 3D Cog Script
  2. #
  3. # RIV_AmbRapids2.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message        entered
  13.  
  14.     thing        soundPos0        nolink
  15.     
  16.     sector      start_Amb1      linkID=1
  17.     
  18.     sector      stop_Amb1       linkID=0
  19.     sector      stop_Amb2       linkID=0
  20.     sector      stop_Amb3       linkID=0
  21.     
  22.     sound        snd_rapids=gen_waterfall_a.wav      local
  23.     
  24.     int         playing=0               local
  25.     int         channel0=0              local
  26.     
  27.     flex        min_Pos0=-1
  28.     flex        max_Pos0=-1
  29.     
  30. end
  31.  
  32. # ========================================================================================
  33.  
  34. code
  35.  
  36. entered:
  37.  
  38.     if((GetSenderID() == 1) && (playing == 0))
  39.     {
  40.         playing = 1;
  41.         
  42.         Sleep(Rand()+0.5);
  43.         channel0 = PlaySoundThing(snd_Rapids, soundPos0, 1.0, min_Pos0, max_Pos0, 0x0001);
  44.     }
  45.     
  46.     if(GetSenderID() == 0)
  47.     {
  48.         playing = 0;
  49.         StopSound(channel0, 2.0);
  50.     }
  51.     
  52.     return;
  53.  
  54. # ========================================================================================
  55.  
  56. end
  57.